<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="br.projecao.spe.modelo.Usuario" %>
<%
    Usuario usuario = (Usuario)session.getAttribute("USUARIO");
    if(usuario==null){
        getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
        return;
    }

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <style>
            @import url(css/estilo.css);
        </style>
        <link rel="Shortcut Icon" href="http://www.faculdadeprojecao.edu.br/favicon.ico" type="image/x-icon" />
        <title>SPE - Menu Principal</title>

        <script type="text/javascript">
            //SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
            //By Dynamic Drive: http://www.dynamicdrive.com/style/

            var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

            function buildsubmenus(){
            for (var i=0; i<menuids.length; i++){
              var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
                    for (var t=0; t<ultags.length; t++){
                    ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
                            if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
                                    ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
                            else //else if this is a sub level submenu (ul)
                              ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
                    ultags[t].parentNode.onmouseover=function(){
                    this.getElementsByTagName("ul")[0].style.display="block"
                    }
                    ultags[t].parentNode.onmouseout=function(){
                    this.getElementsByTagName("ul")[0].style.display="none"
                    }
                    }
                            for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
                            ultags[t].style.visibility="visible"
                            ultags[t].style.display="none"
                            }
              }
            }

            if (window.addEventListener)
            window.addEventListener("load", buildsubmenus, false)
            else if (window.attachEvent)
            window.attachEvent("onload", buildsubmenus)

        </script>
    </head>

    <body bgcolor="#feffff" style="background-image: url('/spe/img/back.gif'); margin: 0px">
        <table width="100%" style="background-color: #ffffff">
            <tr>
                <td>
                    <img src="/spe/img/logo.jpg" border="0" title="Ir para a página inicial da Faculdade Projeção"/>
                </td>
                <td>
                    Sistema de Controle de Planos de Ensino
                </td>
            </tr>
        </table>
        Bem vindo, <%= usuario.getNome() %> o seu perfil é de: <%= usuario.getIdperfil().getDescricao() %>
        <hr/>
        <table style="border: transparent">
            <tr>
                <td bgcolor="#EBEBEB" valign="top">
                    <table class="tableHeader">
                        <tr><td>Menu Principal</td></tr>
                    </table>
                    <div class="suckerdiv">
                        <ul id="suckertree1">
                            <li><a href="#">Usuários</a>
                                <ul>
                                    <li><a href="cadastroUsuario.jsp" target="iframe01">Cadastrar novo usuário</a></li>
                                    <li><a href="#">Consultar/Alterar</a></li>
                                    <li><a href="#">Excluir</a></li>
                                    <li><a href="#">Alterar dados pessoais</a></li>
                                </ul>
                            </li>
                            <li><a href="#">Planos de Ensino</a>
                                <ul>
                                    <li><a href="#">Cadastrar novo plano de ensino</a></li>
                                    <li><a href="#">Consultar/Alterar</a></li>
                                    <li><a href="#">Excluir</a></li>
                                </ul>
                            </li>
                            <li><a href="#">Cursos</a>
                                <ul>
                                    <li><a href="#">Cadastrar novo curso</a></li>
                                    <li><a href="#">Consultar/Alterar</a></li>
                                    <li><a href="#">Excluir</a></li>
                                </ul>
                            </li>
                            <li><a href="#">Disciplinas</a>
                                <ul>
                                    <li><a href="#">Cadastrar nova disciplina</a></li>
                                    <li><a href="#">Consultar/Alterar</a></li>
                                    <li><a href="#">Excluir</a></li>
                                </ul>
                            </li>
                            <li><a href="#">Turmas</a>
                                <ul>
                                    <li><a href="#">Cadastrar nova turma</a></li>
                                    <li><a href="#">Consultar/Alterar</a></li>
                                    <li><a href="#">Excluir</a></li>
                                </ul>
                            </li>
                            <li><a href="#">Bibliografia</a>
                                <ul>
                                    <li><a href="#">Cadastrar nova referência</a></li>
                                    <li><a href="#">Consultar/Alterar</a></li>
                                    <li><a href="#">Excluir</a></li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </td>
                <td width="90%">
                    <iframe name="iframe01" width="100%" height="550" scrolling="Auto" frameborder="0" src="html/iframe_background.html"</iframe>
                </td>
            </tr>
        </table>
    </body>
</html>
